<?php
session_start();

//$smb = @ mysql_connect(MYSQL_SERVER, MYSQL_USER,MYSQL_PASSWORD)
//           or die("Cannot connect to MySQL: ". mysql_error());
//mysql_query("SET NAMES 'utf8'") or die (mysql_error());
//mysql_select_db(MYSQL_DATABASE,$smb) or die('Cannot select '.MYSQL_DATABASE);

//$smjdb = mysql_connect("localhost", "smjdb", "khongcogi", true); 
////mysql_query("SET NAMES 'utf8'") or die (mysql_error());
//mysql_select_db('smjdb', $smjdb);
global $dbdefault;
global $dbh2;

//$dbdefault = mysql_connect("localhost", "smobile", "khongcogi"); 
$dbdefault = mysql_connect("localhost", "root", ""); 
mysql_query("SET NAMES 'utf8'") or die (mysql_error());


$dbh2 = mysql_connect("localhost:3306", "smjdb", "khongcogi", true); 
mysql_query("SET NAMES 'utf8'") or die (mysql_error());

mysql_select_db('servicedesk', $dbdefault);
if($dbh2){
mysql_select_db('smjdb', $dbh2);
}

